<input #fileElement type="file" [accept]="accept" (change)="_fileChanged()" hidden>
<div class="nt-picture-item {{ type }}"
  *ngFor="let file of files"
  [style.backgroundImage]="'url(' + file.thumbnail + ')'"
  [class.nt-upload-error]="file.status === 3"
  [class.nt-upload-success]="file.status === 2">
  <div class="nt-picture-action" *ngIf="file.status !== 0 && file.status !== 1 && !disabled">
    <span class="nt-picture-symbol nt-picture-symbol-preview" (click)="preview(file)"></span>
    <span class="nt-picture-symbol nt-picture-symbol-remove" (click)="removeFile(file)"></span>
  </div>
  <div class="nt-picture-progress" *ngIf="file.status === 1" [@fadeOut]>
    <nt-progress *ngIf="file.status === 1" [value]="file.progress" size="tiny" color="success"></nt-progress>
  </div>
</div>
<div class="nt-picture-add {{ type }}" (click)="onTriggerClick()" *ngIf="files.length < maxFiles && !disabled">
  <span class="nt-picture-symbol nt-picture-symbol-add"></span>
</div>
<ng-template #previewTemplate let-data>
  <div class="nt-picture-preview">
    <img [src]="data.link || data.thumbnail">
  </div>
</ng-template>

